In the production of camshafts, different components are produced separately and joined onto a prefabricated shaft. For joining purposes, the components on the shaft are moved axially on to a widened portion of the shaft. This is done typically using a tool referred to as a clamping nest. Such a tool is known from DE 102009060349 A1. Using the tool referred to in said document as an aligning unit, the tool is gripped and moved along the shaft, i.e. in the axial direction. The aligning unit additionally has various elements which adjust the angled position of the component. In the axial direction, the aligning unit disclosed in said document has just one stop to fix the component in a form-fitting manner in the axial direction. The component can thus be moved, by way of the aligning unit, only in one axial direction. Once the component has been fastened, the aligning unit is moved in the opposite axial direction until it is separated from the component, and can then be removed. In the case of modern engines, the amount of installation space on and around the camshaft, however, is vastly restricted. Movement in the axial direction for removing the tool is therefore always not possible.